#ifndef _CPLAYER_
#define _CPLAYER_

#include <vector>
using namespace std;

#include "CBase.h"
#include "CWeapon.h"
#include "CCombo.h"


enum eWeaponTypes { WEAPON_GAUNTLET = 0, WEAPON_SPEAR, WEAPON_SWORD, WEAPON_MAX }; 

class CPlayer : public CBase
{
	vector<CWeapon*> m_vPlayerWeapons;
	int m_nCurrentWeapon;
	int m_nGauntletLevel;
	int m_nSwordLevel;
	int m_nSpearLevel;


	vector<CCombo*> m_vPlayerCombos;
	int m_nGauntletComboExp;
	int m_nSwordComboExp;
	int m_nSpearComboExp;

	bool m_bGauntletPickUp;

	int m_nPlayerExp;
	int m_nSwordExp;
	int m_nSpearExp;
	int m_nGauntletExp;

	float m_fTimer;

	int m_nImageID;
	vector<int> m_nAnimationIDs;
	int currentAnimation;
	int m_nGoodCombo;

public:
	CPlayer();
	~CPlayer( void );
	void Update(float fElapsedTime);
	void Render();
	bool CheckCollision( CBase* pBase );
	RECT GetCollisionRect();
	RECT GetAttackRect( void );

	// Accessors
	int GetPlayerExp(){return m_nPlayerExp;}
	int GetSwordExp( void ) { return m_nSwordExp; }
	int GetSpearExp( void ) { return m_nSpearExp; }
	int GetGauntletExp( void ) { return m_nGauntletExp; }

	int GetSwordComboExp( void ) { return m_nSwordComboExp; }
	int GetSpearComboExp( void ) { return m_nSpearComboExp; }
	int GetGauntletComboExp( void ) { return m_nGauntletComboExp; }

	int GetEnumCurrentWeapon( void ) { return m_nCurrentWeapon; }
	int GetSwordLevel( void ) { return m_nSwordLevel; }
	int GetSpearLevel( void ) { return m_nSpearLevel; }
	int GetGauntletLevel( void ) { return m_nGauntletLevel; }

	// Mutators
	void SetPlayerExp(int nPlayerExp){m_nPlayerExp = nPlayerExp;}
	void SetSwordExp( int nSwordExp ) { m_nSwordExp = nSwordExp; }
	void SetSpearExp( int nSpearExp ) { m_nSpearExp = nSpearExp; }
	void SetGauntletExp( int nGauntletExp ) { m_nGauntletExp =  nGauntletExp; }

	void SetSwordComboExp( int nSwordComboExp ) { m_nSwordComboExp = nSwordComboExp; }
	void SetSpearComboExp( int nSpearComboExp ) { m_nSpearComboExp = nSpearComboExp; }
	void SetGauntletComboExp( int nGauntletComboExp ) { m_nGauntletComboExp = nGauntletComboExp; }

	void SetEnumCurrentWeapon( int nCurrentWeapon ) { m_nCurrentWeapon = nCurrentWeapon; }
	void SetSwordLevel( int nSwordLevel ) { m_nSwordLevel = nSwordLevel; }
	void SetSpearLevel( int nSpearLevel ) { m_nSpearLevel = nSpearLevel; }
	void SetGauntletLevel( int nGauntletLevel ) { m_nGauntletLevel = nGauntletLevel; }
	
	bool GetGauntlet(){return m_bGauntletPickUp;}
	void SetGauntlet(bool bGauntlet){m_bGauntletPickUp = bGauntlet;}

	int GetCurrentAnimation( void ) { return currentAnimation; }
	
	int GetGoodCombo( void ) { return m_nGoodCombo; }
	vector< int > GetAnimationIDs( void ) { return m_nAnimationIDs; }

	vector<CCombo*> GetCombos( void ) { return m_vPlayerCombos; }
	void SetPlayerCombos( void ); 
	void LoadPlayerCombos( void );
	
	vector<CWeapon*> GetWeapon( void ) { return m_vPlayerWeapons; }
	int SearchWeapon( void );
	int SearchWeapon( string strWeaponName );
	void LoadWeaponInfo( void );
	string GetCurrentWeapon( void );

};

#endif